import React from 'react'
import {useLocation,useParams} from "react-router-dom"
function Detail() {
  const location = useLocation()
  const params = useParams()
  console.log(params,1111);
  const id = params.id
  console.log(location);
  return (
    <div>
        {location.state.name}
        {params.id}
    </div>
  )
}

export default Detail